
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>${plateformConfig.system_name}</title>
    <link href="/res/plugins/hplus/css/font-awesome.css" rel="stylesheet" type="text/css" media="all" />
    <link href="/res/css/v2/common.css" rel="stylesheet" type="text/css" media="all" />
    <link href="https://static.9hive.cn/global/vendor/nprogress/nprogress.css" rel="stylesheet">
    <!--<link rel="stylesheet" href="/res/plugins/jiuyue/demo-files/demo.css">-->
    <link rel="stylesheet" href="/res/plugins/jiuyue/style.css"></head>

<!--<link rel="stylesheet" href="https://nsr.9hive.cn/hive/assets/admin/admin2.css">-->

<style>
    html { overflow:hidden; }
    .a{
        border-bottom: 1px solid #ddd;
        border-top: 1px solid #ddd;
    }
    .header-wrapper .top-nav {
        font-size: 12px;
        color: #eff4fe;
        display: flex;
        display: -webkit-flex;
        margin-right: 40px;
    }
    .header-wrapper .icon-img {
        display: inline-block;
        margin: 9px 10px 10px 0;
        height: 34px;
        width: 34px;
        border: 1px solid #fff;
        border-radius: 34px;
    }
    .header-wrapper .icon-word {
        position: inherit;
        font-size: 12px;
        line-height: 60px;
        z-index: 5;
        margin: 0;
    }
    .header-wrapper .drop {
        display: none;
        position: absolute;
        top: 50px;
        right: -28px;
        width: 110px;
        height: 55px;
        text-align: center;
        border: 1px solid #fff;
        border-radius: 3px;
        background-color: #fff;
        box-shadow: 0 1px 5px rgba(0,0,0,.2);
        z-index: 400;
    }
    .logo-title{
        font-size: 16px;
    }
</style>

</head>
<body>
<div class="header-wrapper">
    <div class="header clearfix">
        <div class="logo l">
            <a>
                <%if(isNotEmpty(plateformConfig.system_logo)){%>
                    <img src="${plateformConfig.system_logo}">
                <%}else{%>
                    <img src="https://imgs.9hive.cn/4da05513b44a4762849c3fe32f792aa8/201704/b499f1277e2e4fdbbb76059312662888.png">
                <%}%>
            </a>
            <%if(isNotEmpty(plateformConfig.system_name)){%>
                <span class="logo-title">${plateformConfig.system_name}</span>
            <%}else{%>
                <span class="logo-title">蜂巢超级管理员</span>
            <%}%>
        </div>
        <div class="view-tab l">
            <%
                var index=0,firstId;
            %>
            <%for(br in lbr1!){%>
                <%if(admin.roleId! == 'super' || strutil.contain(ranks,br.id!)){%>
                    <a href="#${br.url}" <%if(index == 0){%>class="selected"<%}%> >${br.name}</a>
                    <%
                        if(index == 0){
                            firstId = br.url;
                        }
                            index++;
                    %>
                <%}%>
            <%}%>
        </div>
        <div class="top-nav r">
            <%if(isNotEmpty(admin.headImg)){%>
                <img src="${admin.headImg!}" class="icon-img"/>
            <%}else{%>
                <img src="/res/img/headimg.png" class="icon-img"/>
            <%}%>
            <ul>
                <li>
                    <p class="icon-word">${admin.username}<span class="caret"></span></p>
                    <ul class="drop">
                        <li><a href="/html/update_log.html" target="mainFrame">帮助</a></li>
                        <li><a href="/sys/logout">退出</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="body">
    <div class="aside" id="aside">
        <div class="nav-wrapper">
            <div class="title" >

                <span class="l nav-text">系统导航</span>
                <span id="event-monitor-operation" class="operation close icon-font" style="font-size: 16px;margin-top: 13px"></span>
            </div>

            <%for(br in lbr1!){%>
            <ul  class="nav hm-scroll"  <%if(firstId != br.url){%>style="display:none"<%}%> id="${br.url}">
            <%for(br2 in lbr2!){%>
                <%if(br2.parent_id == br.id){%>
                    <%if(admin.roleId! == 'super' || strutil.contain(ranks,br2.id)){%>
                    <li class="flow-analysis menu-item selected clearfix">
                        <a href="javascript:void(0)" class="expandable recordable open">
                            <span class="fa ${br2.icon!'fa-empire'}" style="font-size: 1.3em;margin-left: 20px"></span>
                            <span class="item-title">${br2.name}</span>
                        </a>
                        <ul class="open expandable-level1 expandable-content" >
                            <%for(br3 in lbr3!){%>
                                <%if(br3.parent_id == br2.id){%>
                                    <%if(admin.roleId! == 'super' || strutil.contain(ranks,br3.id)){%>
                                    <li>
                                        <%
                                            var url=(br3.url);
                                        %>

                                        <a href="${url}" target="mainFrame" class=" ">
                                            <span class="l menu-label">${br3.name}</span>
                                            <span class="normal icon-font">&nbsp;</span>
                                        </a>
                                    </li>
                                    <%}%>
                                <%}%>
                            <%}%>
                        </ul>
                    </li>
                    <%}%>
                <%}%>
            <%}%>
            </ul>
            <%}%>
        </div>

        <div class="simple-nav-wrapper hide">
            <div class="title"><span class="operation open icon-font" style="font-size: 16px;margin-top: 13px"></span></div>
            <%for(br in lbr1!){%>
                <ul class="simple-nav" id="${br.url}simple" <%if(!brLP.first){%>style="display:none"<%}else{%>style="display:block" <%}%> id="${br.url}">
                <%for(br2 in lbr2!){%>
                    <%if(br2.parent_id == br.id){%>
                        <%if(admin.roleId! == 'super' || strutil.contain(ranks,br2.id)){%>
                        <li class="flow-analysis menu-item clearfix hover-menu" >
                            <span class="fa ${br2.icon!'fa-empire'}" style="font-size: 1.3em;"></span>
                            <ul class="item-content hm-scroll hide">
                                <li class="nav-title">${br2.name}</li>
                                <%for(br3 in lbr3!){%>
                                    <%if(br3.parent_id == br2.id){%>
                                        <%if(admin.roleId! == 'super' || strutil.contain(ranks,br3.id)){%>
                                        <li>
                                            <%
                                                var url=(br3.url);
                                            %>
                                            <a class="_menu-link" href="${url}" target="mainFrame" class="">
                                                <span data="95" class="l menu-label">${br3.name}</span>
                                                <span class="normal icon-font"></span>
                                            </a>
                                        </li>
                                        <%}%>
                                    <%}%>
                                <%}%>
                            </ul>
                        </li>
                        <%}%>
                    <%}%>
                <%}%>
                </ul>
            <%}%>
        </div>
    </div>
    <div class="main" style="overflow: hidden;">
        <iframe class="J_iframe"  frameborder="0"  style="overflow-x:hidden;overflow-y: auto;" id="mainFrame" name="mainFrame" width="100%" height="100%" src="${base}/html/update_log.html"></iframe>
    </div>

</div>
<!--</div>-->
<script src="/res/plugins/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="https://static.9hive.cn/global/vendor/nprogress/nprogress.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-copy/clipboard.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>
<script type="text/javascript">
    NProgress.start();
    window.onload = function() {
        NProgress.done();
    };
    $().ready(function() {
        var $menu = $(".nav-wrapper .nav");
        var $simplemenu=$(".simple-nav-wrapper .simple-nav");

        var $menuItem = $(".nav-wrapper .nav a");
        var $nava = $(".view-tab a");
        $nava.click(function(){
            var $this = $(this);
            $nava.removeClass("selected");
            $this.addClass("selected");

            //menu
            var $currentMenu = $($this.attr("href"));
            $menu.hide();
            $currentMenu.show();

            //simpleMenu
            var $currentSimpleMenu=$($this.attr("href")+"simple");
            $simplemenu.hide();
            $currentSimpleMenu.show();
            return false;
        });

        $menuItem.click(function() {
            var $this = $(this);
            $menuItem.removeClass("selected");
            $this.addClass("selected");
        });


        var resizeContentH = function(contentID,leftId){
            jQuery(contentID).height(jQuery(window).height() - 50);
            $("#"+leftId).height(jQuery(document).height() - 70);
        };

        /*窗口尺寸重载*/
        resizeContentH("#mainFrame","aside");
        $(window).resize(function(){
            resizeContentH("#mainFrame","aside");
        });

        //所有二级菜单的展开与闭合
        $(".operation").click(function () {
            var $this = $(this);
            var ppaerntClass=$this.parent().parent().attr("class");
            //alert(ppaerntClass.indexOf("nav-wrapper"));
            if(ppaerntClass.indexOf("nav-wrapper")==0){
                $(".nav-wrapper").attr("class","nav-wrapper hide");
                $(".simple-nav-wrapper").attr("class","simple-nav-wrapper");
                $(".main").attr("style","margin-left: 51px;");
            }else if(ppaerntClass.indexOf("simple-nav-wrapper")==0){
                $(".nav-wrapper").attr("class","nav-wrapper");
                $(".simple-nav-wrapper").attr("class","simple-nav-wrapper hide");
                $(".main").attr("style","margin-left: 181px;");
            }
        });

        //三级菜单闭合或者展开
        $(".expandable").click(function () {
            $this = $(this);
            var uClass=$this.next().attr("class");
            if(uClass.indexOf("open")==0){
                $this.next().css('display', 'none');
                $this.next().attr("class","close expandable-level1 expandable-content");
            }else{
                $this.next().css('display', 'block');
                $this.next().attr("class","open expandable-level1 expandable-content");
            }
        });

        //鼠标移上去和移下来事件
        $(".hover-menu").on("mouseover",function () {
            $this = $(this);
            $this.find(".item-content").attr("class","item-content hm-scroll");
            $this.find(".item-content").parent('li').addClass("a");
        });
        $(".hover-menu").on("mouseout",function () {
            $this = $(this);
            $this.find(".item-content").attr("class","item-content hm-scroll hide");
            $this.find(".item-content").parent('li').removeClass("a");
        });

        $(function(){
            $(".top-nav ul li:has(ul)").hover(function(){
                $(this).children("ul").stop(true,true).slideDown(400);
            },function(){
                $(this).children("ul").stop(true,true).slideUp("fast");
            });
        })
    });


    function _send(type,sel,val){
        //alert(v);
        if(type == "append"){
            $("#mainFrame").contents().find('#'+sel).append(val);
        }else if(type == "val"){
            $("#mainFrame").contents().find('#'+sel).val(val);
        }else if(type == "html"){
            $("#mainFrame").contents().find('#'+sel).html(val);
        }else if(type == "method"){//调用子页面的receive方法
            $("#mainFrame")[0].contentWindow.receive(val);
        }

    }

    function _get(sel,val){
        if(val)
            return $("#mainFrame").contents().find('#'+sel).find(val);
        else
            return $("#mainFrame").contents().find('#'+sel).val();
    }


    //urlEncode
    function genUrl(url){
        return url + "?trueUrl=" + encodeURIComponent(url);
    }


</script>

</body>

</html>
